package com.syni.mdd.sjb.marketing.basemarket.controller.protect.luckydraw;

import com.syni.mdd.sjb.common.component.utils.common.annotations.CheckUserIdentity;
import com.syni.mdd.sjb.marketing.basemarket.entity.vo.requestVo.BaseRqVo;
import com.syni.mdd.sjb.marketing.basemarket.service.MarketIndexService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/index")
public class MarketIndexController {



    @Autowired
    MarketIndexService marketIndexService;

    @PostMapping("/all")
    @ApiOperation(value = "数据宝营销全部接口")
    @CheckUserIdentity
    public Map<String,Object> all(@RequestBody BaseRqVo baseRqVo){
        String accountId = baseRqVo.getToken();
        return marketIndexService.all(baseRqVo.getPageNum(),baseRqVo.getPageSize(),accountId);
    }
}
